import useServer from "server";
import { TaskTypesType } from "types";
import { useQuery } from "react-query";

export const useTaskTypes = (param?: Partial<TaskTypesType>) => {
  const client = useServer();

  return useQuery<TaskTypesType[]>(["taskTypes", param], () => {
    return client("taskTypes", { data: param });
  });
};
